package com.alex.springboot02web.controller;

import org.springframework.web.bind.annotation.*;

@RestController
public class RestTestController {

    @RequestMapping("/home")
    public String test01() {
        return "INDEX from controller";
    }

//    @RequestMapping(value = "/user", method = RequestMethod.POST)
    @PostMapping("/user")
    public String user01() {
        return "post user";
    }

//    @RequestMapping(value = "/user", method = RequestMethod.DELETE)
    @DeleteMapping("/user")
    public String user02() {
        return "delete user";
    }

//    @RequestMapping(value = "/user", method = RequestMethod.PUT)
    @PutMapping("/user")
    public String user03() {
        return "put user";
    }

//    @RequestMapping(value = "/user", method = RequestMethod.GET)
    @GetMapping("/user")
    public String user04() {
        return "get user";
    }
}
